home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / jpegsrc4.zip / MAKEFILE.UNI < prev    next >
Text File  |  1992-12-07  |  7KB  |  172 lines

  1. # Makefile for Independent JPEG Group's software
  2.  
  3. # This makefile is suitable for Unix-like systems with non-ANSI compilers.
  4. # If you have an ANSI compiler, makefile.ansi is a better starting point.
  5.  
  6. # Read SETUP instructions before saying "make" !!
  7.  
  8. # The name of your C compiler:
  9. CC= cc
  10.  
  11. # You may need to adjust these cc options:
  12. CFLAGS= -O
  13. # In particular:
  14. #   Add -DBSD if on a pure BSD system (see jinclude.h).
  15. #   Add -DVMS if on a VMS system (see ansi2knr.c).
  16. #   Add -DMSDOS if on an MSDOS system (see ansi2knr.c).
  17. #   Add -DMEM_STATS to enable gathering of memory usage statistics.
  18. #   You may also want to add -DTWO_FILE_COMMANDLINE or -D switches for other
  19. #   symbols listed in jconfig.h, if you prefer not to change jconfig.h.
  20.  
  21. # Link-time cc options:
  22. LDFLAGS= 
  23.  
  24. # To link any special libraries, add the necessary -l commands here.
  25. # In particular, on some versions of HP-UX (and probably other SysV-derived
  26. # systems) there is a faster alternate malloc(3) library that you can use
  27. # by adding "-lmalloc" to this line.
  28. LDLIBS= 
  29.  
  30. # miscellaneous OS-dependent stuff
  31. # linker
  32. LN= $(CC)
  33. # file deletion command
  34. RM= rm -f
  35. # library (.a) file creation command
  36. AR= ar rc
  37. # second step in .a creation (use "touch" if not needed)
  38. AR2= ranlib
  39.  
  40.  
  41. # source files (independently compilable files)
  42. SOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
  43.         jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
  44.         jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
  45.         jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c jmemmgr.c \
  46.         jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c jwrjfif.c jwrgif.c \
  47.         jwrppm.c jwrrle.c jwrtarga.c
  48. # virtual source files (not present in distribution file, see SETUP)
  49. VIRTSOURCES= jmemsys.c
  50. # system-dependent implementations of virtual source files
  51. SYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
  52.         jmemdosa.asm
  53. # files included by source files
  54. INCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h
  55. # documentation, test, and support files
  56. DOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
  57. MAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
  58.         makcjpeg.st makdjpeg.st makljpeg.st makefile.mc5 makefile.mc6 \
  59.         makefile.bcc makefile.mms makefile.vms makvms.opt
  60. OTHERFILES= ansi2knr.c ckconfig.c example.c
  61. TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
  62. DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
  63.         $(OTHERFILES) $(TESTFILES)
  64. # objectfiles common to cjpeg and djpeg
  65. COMOBJECTS= jutils.o jerror.o jmemmgr.o jmemsys.o
  66. # compression objectfiles
  67. CLIBOBJECTS= jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o jchuff.o \
  68.         jcmcu.o jcpipe.o jcsample.o jfwddct.o jwrjfif.o jrdgif.o jrdppm.o \
  69.         jrdrle.o jrdtarga.o
  70. COBJECTS= jcmain.o $(CLIBOBJECTS) $(COMOBJECTS)
  71. # decompression objectfiles
  72. DLIBOBJECTS= jdmaster.o jddeflts.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
  73.         jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o jrdjfif.o \
  74.         jwrgif.o jwrppm.o jwrrle.o jwrtarga.o
  75. DOBJECTS= jdmain.o $(DLIBOBJECTS) $(COMOBJECTS)
  76. # These objectfiles are included in libjpeg.a
  77. LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  78.  
  79.  
  80. all: ansi2knr cjpeg djpeg
  81. # By default, libjpeg.a is not built unless you explicitly request it.
  82. # You can add libjpeg.a to the line above if you want it built by default.
  83.  
  84.  
  85. # This rule causes ansi2knr to be invoked.  If you use this makefile,
  86. # make sure PROTO is not defined by jconfig.h.
  87.  
  88. .c.o:
  89.     ./ansi2knr $*.c tmpansi.c
  90.     $(CC) $(CFLAGS) -c tmpansi.c
  91.     mv tmpansi.o $*.o
  92.     $(RM) tmpansi.c
  93.  
  94. ansi2knr: ansi2knr.c
  95.     $(CC) $(CFLAGS) -o ansi2knr ansi2knr.c
  96.  
  97.  
  98. cjpeg: ansi2knr $(COBJECTS)
  99.     $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS)
  100.  
  101. djpeg: ansi2knr $(DOBJECTS)
  102.     $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) $(LDLIBS)
  103.  
  104. # libjpeg.a is useful if you are including the JPEG software in a larger
  105. # program; you'd include it in your link, rather than the individual modules.
  106. libjpeg.a: ansi2knr $(LIBOBJECTS)
  107.     $(RM) libjpeg.a
  108.     $(AR) libjpeg.a  $(LIBOBJECTS)
  109.     $(AR2) libjpeg.a
  110.  
  111. jmemsys.c:
  112.     echo You must select a system-dependent jmemsys.c file.
  113.     echo Please read the SETUP directions.
  114.     exit 1
  115.  
  116. clean:
  117.     $(RM) *.o cjpeg djpeg libjpeg.a ansi2knr core tmpansi.* testout.*
  118.  
  119. distribute:
  120.     $(RM) jpegsrc.tar*
  121.     tar cvf jpegsrc.tar $(DISTFILES)
  122.     compress -v jpegsrc.tar
  123.  
  124. test: cjpeg djpeg
  125.     $(RM) testout.ppm testout.gif testout.jpg
  126.     ./djpeg testorig.jpg >testout.ppm
  127.     ./djpeg -gif testorig.jpg >testout.gif
  128.     ./cjpeg testimg.ppm >testout.jpg
  129.     cmp testimg.ppm testout.ppm
  130.     cmp testimg.gif testout.gif
  131.     cmp testimg.jpg testout.jpg
  132.  
  133.  
  134. jbsmooth.o : jbsmooth.c jinclude.h jconfig.h jpegdata.h 
  135. jcarith.o : jcarith.c jinclude.h jconfig.h jpegdata.h 
  136. jccolor.o : jccolor.c jinclude.h jconfig.h jpegdata.h 
  137. jcdeflts.o : jcdeflts.c jinclude.h jconfig.h jpegdata.h 
  138. jcexpand.o : jcexpand.c jinclude.h jconfig.h jpegdata.h 
  139. jchuff.o : jchuff.c jinclude.h jconfig.h jpegdata.h 
  140. jcmain.o : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h 
  141. jcmaster.o : jcmaster.c jinclude.h jconfig.h jpegdata.h 
  142. jcmcu.o : jcmcu.c jinclude.h jconfig.h jpegdata.h 
  143. jcpipe.o : jcpipe.c jinclude.h jconfig.h jpegdata.h 
  144. jcsample.o : jcsample.c jinclude.h jconfig.h jpegdata.h 
  145. jdarith.o : jdarith.c jinclude.h jconfig.h jpegdata.h 
  146. jdcolor.o : jdcolor.c jinclude.h jconfig.h jpegdata.h 
  147. jddeflts.o : jddeflts.c jinclude.h jconfig.h jpegdata.h 
  148. jdhuff.o : jdhuff.c jinclude.h jconfig.h jpegdata.h 
  149. jdmain.o : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h 
  150. jdmaster.o : jdmaster.c jinclude.h jconfig.h jpegdata.h 
  151. jdmcu.o : jdmcu.c jinclude.h jconfig.h jpegdata.h 
  152. jdpipe.o : jdpipe.c jinclude.h jconfig.h jpegdata.h 
  153. jdsample.o : jdsample.c jinclude.h jconfig.h jpegdata.h 
  154. jerror.o : jerror.c jinclude.h jconfig.h jpegdata.h 
  155. jquant1.o : jquant1.c jinclude.h jconfig.h jpegdata.h 
  156. jquant2.o : jquant2.c jinclude.h jconfig.h jpegdata.h 
  157. jfwddct.o : jfwddct.c jinclude.h jconfig.h jpegdata.h 
  158. jrevdct.o : jrevdct.c jinclude.h jconfig.h jpegdata.h 
  159. jutils.o : jutils.c jinclude.h jconfig.h jpegdata.h 
  160. jmemmgr.o : jmemmgr.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  161. jrdjfif.o : jrdjfif.c jinclude.h jconfig.h jpegdata.h 
  162. jrdgif.o : jrdgif.c jinclude.h jconfig.h jpegdata.h 
  163. jrdppm.o : jrdppm.c jinclude.h jconfig.h jpegdata.h 
  164. jrdrle.o : jrdrle.c jinclude.h jconfig.h jpegdata.h 
  165. jrdtarga.o : jrdtarga.c jinclude.h jconfig.h jpegdata.h 
  166. jwrjfif.o : jwrjfif.c jinclude.h jconfig.h jpegdata.h 
  167. jwrgif.o : jwrgif.c jinclude.h jconfig.h jpegdata.h 
  168. jwrppm.o : jwrppm.c jinclude.h jconfig.h jpegdata.h 
  169. jwrrle.o : jwrrle.c jinclude.h jconfig.h jpegdata.h 
  170. jwrtarga.o : jwrtarga.c jinclude.h jconfig.h jpegdata.h 
  171. jmemsys.o : jmemsys.c jinclude.h jconfig.h jpegdata.h jmemsys.h 
  172.